package com.hljcert.data.service.common.config;

/**
 * 项目通用状态码
 */
public enum StatusEnum {
    OK(0, "OK"),
    PARAM_ERR(400, "参数错误，或缺少必填项"),
    AUTH_ERR(401, "鉴权失败"),
    EXISTS_DATA(402, "数据已存在"),
    NOT_FOUND(404, "数据不存在"),
    USE_SELF_DATA(408, "只能使用自己的数据"),
    NOT_LOGIN(409, "未登录"),

    NOT_AUTH(410, "未授权父级菜单，请先授权父级菜单"),

    FAIL(500, "业务异常");

    private int code;
    private String msg;

    StatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
